import React, {Suspense} from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import {BrowserRouter} from "react-router-dom"
const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);
root.render(
  <React.StrictMode>
      <BrowserRouter>
          {/*{作用是当网速很慢时，如果页面加载不出来  会先显示预加载内容}*/}
          <Suspense fallback={<h2>Loading...</h2>}>
    <App />
          </Suspense>
      </BrowserRouter>
  </React.StrictMode>
);



